const express = require('express')
const app = express();

//设置秘钥，全局秘钥，用来校验token有没有被客户端篡改
app.set('secret','mudamudamuda5zuiqiangle9999999')

app.use(require('cors')())
app.use(express.json())
app.use('/',express.static(__dirname+'/public'))

require('./plugins/db')(app)
require('./routes/manager')(app)

app.listen(80, () => {
    console.log('http://localhose:80')
})